package lucene.server.common.utils;
import java.io.File;
public class FileUtil {
    public static boolean changeFolderName(String oldPath, String newPath) {
        File oldFile = new File(oldPath);
        // 确保旧路径是一个目录
        if (!oldFile.isDirectory()) {
            throw new IllegalArgumentException("Provided path is not a directory: " + oldPath);
        }

        return oldFile.renameTo(new File(newPath));
    }
}
